<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改雇员</title>
</head>
<body>
	<h1>修改雇员</h1>
	<form action="${pageContext.request.contextPath }/employee.do?flag=updateEmployee" method="post">
	<table>
		<tr><td>ID</td><td><input type="text" name="id" disabled value="${employee.id }" /></td></tr>
		<tr><td>Name</td><td><input type="text" name="name" value="${employee.name }" /></td></tr>
		<tr><td>Email</td><td><input type="email" name="email" value="${employee.email }" /></td></tr>
		<tr><td>Grade</td><td><input type="text" name="grade" value="${employee.grade }" /></td></tr>
		<tr><td>Password</td><td><input type="password" name="pwd" value="${employee.pwd }" /></td></tr>
		<tr><td>Salary</td><td><input type="text" name="salary" value="${employee.salary }" /></td></tr>
		<tr><td>Department</td><td>
		<select name="departmentId">
			<c:forEach items="${departmentList }" var="department">
				<option value="${department.id }" ${department.id == employee.department.id ? 'selected' : '' }>${department.name }</option>
			</c:forEach>
		</select>
		</td></tr>
		<tr><td><input type="submit" value="修改"></td><td></td></tr>
	</table>
	</form>
</body>
</html>